import request from '@/utils/request'
import { stringify } from 'qs';

export function getShowDataByDepartmentCategory (params) {
  const urlParams = params ? `?${stringify(params)}` : '';
  return request({
    url: `/api/bigData/getShowDataByDepartmentCategory${urlParams}`,
    method: 'GET',
    data: params
  })
}

export function getDataByAreaId (params) {
  const urlParams = params ? `?${stringify(params)}` : '';
  return request({
    url: `/api/bigData/getDataByAreaId${urlParams}`,
    method: 'GET',
    data: params
  })
}

export function getDepartmentInfoByDeptId (params) {
  const urlParams = params ? `?${stringify(params)}` : '';
  return request({
    url: `/api/bigData/getDepartmentInfoByDeptId${urlParams}`,
    method: 'GET',
    data: params
  })
}

export function getEChartDataByDeptIdAndType (params) {
  const urlParams = params ? `?${stringify(params)}` : '';
  return request({
    url: `/api/bigData/getEChartDataByDeptIdAndType${urlParams}`,
    method: 'GET',
    data: params
  })
}
